var maxArea = function (height) {
  let l = 0;
  let r = height.length - 1;
  let ans = 0;
  while (l < r) {
    let area = Math.min(height[l], height[r]) * (r - l);
    ans = Math.max(ans, area);
    if (height[l] <= height[r]) {
      ++l;
    } else {
      --r;
    }
  }
  return ans;
};

let arr = [
  6801, 4040, 7716, 493, 526, 2755, 957, 1298, 2477, 6189, 6442, 8476, 4745,
  8663, 2812, 8476, 3802, 7743, 7746, 2513, 4434, 3625, 2470, 4902, 8135, 5773,
  5457, 4527, 6798, 8800, 8824, 9067, 3494, 915, 68, 4671, 5868, 7224, 371,
  4667, 38, 5958, 5616, 945, 6694, 6584, 1912, 1184, 45, 9767, 5674, 7407, 7451,
  6302, 7674, 8803, 9528, 1450, 2176, 7650, 9998, 3815, 7815, 4096, 221, 10000,
  5940, 7124, 7201, 6648, 6892, 6805, 9659, 4132, 1054, 6037, 7620, 7515, 2025,
  6628, 1067, 2431, 175, 2962, 9361, 3271, 4362, 7932, 8800, 2288, 2295, 3600,
  8283, 3356, 2265, 498, 9649, 9290, 8406, 7133, 6224, 6545, 39, 8623, 8549,
  1733, 3448, 5100, 3112, 2852, 9945, 4405, 3104, 6191, 7702, 6373, 6157, 2793,
  4350, 8946, 8329, 5076, 2603, 6162, 2347, 3005, 5911, 425, 4997, 3553, 2866,
  185, 3868, 5366, 474, 8116, 7798, 7434, 611, 4427, 5252, 725, 665, 2886, 8411,
  1284, 891, 8177, 8370, 5277, 4721, 7423, 1418, 1720, 6744, 5584, 9920, 3983,
  7301, 1780, 8295, 8275, 6256, 1900, 2504, 1159, 1897, 7975, 1587, 9276, 236,
  3616, 3168, 8011, 1844, 1481, 3385, 4087, 8862, 1710, 9866, 6134, 5890, 777,
  7985, 7344, 6726, 7942, 5503, 9094, 332, 2208, 9183, 9580, 6036, 1392, 6575,
  4091, 8, 118, 2721, 5945, 2284, 8183, 7176, 5152, 1228, 1585, 8603, 4180, 947,
  1300, 8900, 5256, 4924, 822, 2952, 5054, 8209, 8489, 6737, 2184, 6520, 4390,
  5062, 1504, 5950, 2411, 646, 655, 5050, 5611, 4476, 5392, 9097, 2650, 1307,
  6433, 4805, 2531, 8342, 9797, 9909, 1840, 2999, 8899, 3642, 8285, 9334, 9870,
  264, 253, 48, 1832, 2230, 7958, 5658, 9039, 9475, 290, 3560, 9466, 1457, 8420,
  4410, 3806, 7436, 7149, 1108, 238, 4976, 6640, 8981, 8188, 8913, 4392, 600,
  9952, 7209, 4633, 1643, 1295, 2021, 9344, 5693, 2352, 6212, 3501, 4327, 7677,
  2896, 7474, 567, 9612, 6779, 5910, 2264, 7506, 7549, 8501, 2918, 3081, 5348,
  6616, 1884, 8576, 7068, 223, 3178, 9840, 4002, 6531, 4498, 6376, 4146, 4486,
  7316, 7034, 8351, 2905, 834, 3283, 4517, 7880, 6770, 5496, 1848, 4325, 499,
  1018, 4702, 8859, 913, 4355, 9650, 3316, 1281, 3017, 9227, 4659, 3349, 4294,
  3740, 9522, 9231, 1314, 3026, 1666, 4952, 5113, 1283, 1791, 5690, 1162, 1459,
  4798, 1611, 1318, 9914, 1126, 5770, 7485, 406, 6600, 6757, 6522, 3715, 3604,
  6446, 9574, 5238, 8211, 6539, 9132, 2541, 5969, 2698, 4337, 9660, 3627, 980,
  6335, 3764, 6116, 729, 3566, 8354, 8657, 4608, 8479, 1851, 1714, 1137, 4255,
  1595, 2066, 6877, 8035, 4952, 7035, 4007, 2415, 4505, 7106, 6715, 4774, 3416,
  7899, 2661, 2307, 9614, 5619, 3356, 2611, 801, 118, 971, 5991, 977, 8059,
  7015, 1474, 1011, 7673, 600, 8783, 5179, 9868, 3, 6852, 7968, 9960, 1959,
  6756, 6363, 4606, 1295, 4557, 9589, 7927, 7739, 7583, 4951, 8060, 1277, 8748,
  4258, 148, 1943, 3159, 8714, 7343, 5666, 7220, 1611, 3859, 9753, 7764, 5622,
  6338, 518, 4391, 4059, 8687, 8142, 3878, 1426, 2370, 331, 386, 8420, 8963,
  6734, 8737, 8754, 4735, 1527, 189, 5642, 7774, 9198, 2957, 6906, 7673, 7294,
  3216, 9233, 7370, 7570, 7619, 5310, 4219, 7153, 776, 5407, 235, 2371, 238,
  9465, 7651, 3378, 2849, 2012, 2949, 3917, 4677, 9023, 4668, 7483, 1962, 6546,
  5699, 1848, 7384, 1530, 9267, 3550, 9497, 9158, 7050, 2146, 2057, 3308, 5441,
  7449, 8587, 7576, 8319, 9267, 6262, 720, 3900, 4822, 9522, 7012, 4203, 4428,
  5891, 747, 3271, 8347, 3109, 2967, 4032, 2889, 7166, 2495, 5202, 1362, 7608,
  8124, 4394, 934, 4261, 1132, 9540, 7470, 7881, 2584, 8942, 6277, 3227, 8669,
  409, 4651, 4899, 5608, 453, 6742, 3356, 641, 7207, 372, 9975, 2188, 7341,
  4391, 8456, 8990, 483, 1163, 8853, 6058, 641, 301, 6208, 9591, 9529, 7407,
  8998, 5762, 1008, 1010, 7924, 8270, 9591, 3029, 4842, 4125, 6500, 1360, 5110,
  8483, 5896, 7525, 6984, 5590, 9733, 9221, 6995, 1255, 6474, 4645, 192, 5731,
  6308, 844, 5314, 6915, 7934, 9733, 40, 8123, 9795, 6383, 2175, 7248, 6023,
  5622, 6265, 8076, 883, 8898, 53, 7366, 8856, 2879, 6125, 9745, 1684, 8436,
  4412, 7808, 2618, 4151, 8565, 4182, 3719, 5353, 4679, 5153, 4860, 7909, 3805,
  4679, 419, 6808, 8179, 3842, 1077, 7756, 1100, 4854, 4015, 8201, 4931, 3959,
  6842, 1714, 3645, 8042, 8751, 7765, 6818, 2769, 5972, 5790, 7870, 6906, 3163,
  9746, 2393, 8049, 5145, 5363, 9061, 5483, 1004, 840, 5589, 3088, 7987, 7861,
  5131, 8427, 9752, 1807, 6846, 2499, 529, 2323, 8904, 8384, 667, 5317, 2554,
  9606, 2229, 6500, 1627, 9585, 5142, 5514, 8111, 1749, 5428, 7914, 4778, 2162,
  4158, 6014, 8436, 7981, 4192, 2862, 9388, 3743, 4335, 5034, 5622, 7300, 8417,
  1223, 1663, 379, 1560, 7458, 6188, 2056, 4751, 9242, 1529, 105, 1535, 9914,
  1001, 9793, 5801, 5702, 7658, 4411, 3321, 7616, 2289, 7309, 7620, 8535, 677,
  9139, 3183, 5263, 4825, 3042, 2778, 3472, 4840, 1937, 3925, 3023, 4853, 1569,
  5477, 6575, 2221, 9897, 2606, 7964, 9997, 831, 1873, 2695, 8640, 7874, 2927,
  6965, 5052, 4204, 3580, 6756, 8078, 6826, 2260, 1867, 9128, 1842, 3554, 7168,
  9445, 2664, 7470, 4933, 5092, 9256, 8934, 5410, 6757, 7237, 5139, 6274, 3385,
  178, 6781, 8344, 3217, 8975, 5647, 8825, 4129, 9759, 2593, 2283, 9648, 2817,
  8886, 645, 8285, 9530, 4497, 4688, 4268, 7266, 6585, 2254, 1493, 4278, 1188,
  4476, 6706, 4264, 3816, 892, 8876, 2481, 4089, 4969, 3876, 6815, 7337, 6276,
  8598, 5, 2480, 885, 5970, 1258, 2062, 8261, 8941, 7465, 6150, 5075, 7362,
  9929, 7819, 2751, 4306, 3006, 8966, 6440, 6947, 1290, 3796, 8672, 614, 3177,
  76, 1318, 4289, 8149, 7404, 6496, 9933, 6447, 9583, 5679, 9501, 6726, 2966,
  7461, 2514, 8224, 2031, 6457, 6785, 8451, 9825, 6189, 387, 3219, 2272, 1942,
  8603, 9239, 2212, 8312, 4031, 9546, 8585, 5366, 8465, 2432, 4154, 330, 4919,
  6098, 9708, 2952, 5322, 1123, 6376, 2701, 8946, 7686, 5238, 2345, 3671, 8892,
  4019, 3037, 6409, 9341, 3689, 5193, 3465, 3118, 3383, 8902, 5175, 6340, 9649,
  96, 6018, 5725, 8561, 2583, 7209, 1192, 4604, 3384, 8198, 9, 3466, 8529, 3790,
  1323, 525, 4713, 7740, 8788, 2245, 5982, 5800, 4488, 4139, 9277, 1860, 1193,
  4160, 298, 7358, 8935, 3479, 5895, 7842, 8727, 6365, 9250, 2588, 6830, 1772,
  6114, 8154, 4021, 8200, 3826, 2792, 1207, 8798, 4701, 4471, 7952, 4734, 141,
  250, 9646, 9270, 6578, 1561, 2524, 3307, 3341, 8482, 191, 6097, 3483, 5844,
  1773, 7584, 4144, 8199, 8808, 446, 9439, 2943, 3368, 5506, 3812, 9963, 992,
  8094, 4930, 6935, 3726, 7869, 1211, 8698, 9294, 8789, 2437, 3178, 3122, 1546,
  6441, 6554, 8882, 4323, 1805, 1765, 804, 4475, 9890, 7932, 8618, 5546, 4547,
  8758, 6845, 8999, 7018, 8939, 4398, 5868, 8580, 5216, 156, 8361, 7005, 9386,
  8358, 1976, 1193, 2394, 127, 4026, 6370, 9102, 2309, 4161, 5529, 1317, 4567,
  4975, 3809, 5471, 100, 9864, 9464, 6109, 3935, 9462, 3209, 4715, 6439, 6923,
  9571, 4043, 4750, 5188, 5599, 1182, 5061, 4517, 1205, 8610, 3227, 1825, 540,
  8776, 9341, 6182, 5601, 9287, 2850, 9375, 1314, 2058, 605, 9524, 6555, 2021,
  2762, 4945, 6478, 2506, 1136, 7903, 1038, 8230, 3588, 151, 9945, 8114, 7905,
  1320, 6613, 4677, 2485, 5340, 1078, 2090, 8290, 5878, 7314, 7926, 8951, 224,
  6723, 8744, 3469, 9218, 894, 6555, 4808, 244, 3110, 2401, 938, 2710, 7596,
  6430, 6913, 82, 3287, 1444, 2057, 1489, 4556, 5639, 8400, 8740, 3112, 9660,
  9512, 7381, 5655, 4146, 5457, 4527, 6798, 8800, 8824, 9067, 3494, 915, 68,
  4671, 5868, 7224, 371, 4667, 38, 5958, 5616, 945, 6694, 6584, 1912, 1184, 45,
  9767, 5674, 7407, 7451, 6302, 7674, 8803, 9528, 1450, 2176, 7650, 9998, 3815,
  7815, 4096, 221, 10000, 5940, 7124, 7201, 6648, 6892, 6805, 9659, 4132, 1054,
  6037, 7620, 7515, 2025, 6628, 1067, 2431, 175, 2962, 9361, 3271, 4362, 7932,
  8800, 2288, 2295, 3600, 8283, 3356, 2265, 498, 9649, 9290, 8406, 7133, 6224,
  6545, 39, 8623, 8549, 1733, 3448, 5100, 3112, 2852, 9945, 4405, 3104, 6191,
  7702, 6373, 6157, 2793, 4350, 8946, 8329, 5076, 2603, 6162, 2347, 3005, 5911,
  425, 4997, 3553, 2866, 185, 3868, 5366, 474, 8116, 7798, 7434, 611, 4427,
  5252, 725, 665, 2886, 8411, 1284, 891, 8177, 8370, 5277, 4721, 7423, 1418,
  1720, 6744, 5584, 9920, 3983, 7301, 1780, 8295, 8275, 6256, 1900, 2504, 1159,
  1897, 7975, 1587, 9276, 236, 3616, 3168, 8011, 1844, 1481, 3385, 4087, 8862,
  1710, 9866, 6134, 5890, 777, 7985, 7344, 6726, 7942, 5503, 9094, 332, 2208,
  9183, 9580, 6036, 1392, 6575, 4091, 8, 118, 2721, 5945, 2284, 8183, 7176,
  5152, 1228, 1585, 8603, 4180, 947, 1300, 8900, 5256, 4924, 822, 2952, 5054,
  8209, 8489, 6737, 2184, 6520, 4390, 5062, 1504, 5950, 2411, 646, 655, 5050,
  5611, 4476, 5392, 9097, 2650, 1307, 6433, 4805, 2531, 8342, 9797, 9909, 1840,
  2999, 8899, 3642, 8285, 9334, 9870, 264, 253, 48, 1832, 2230, 7958, 5658,
  9039, 9475, 290, 3560, 9466, 1457, 8420, 4410, 3806, 7436, 7149, 1108, 238,
  4976, 6640, 8981, 8188, 8913, 4392, 600, 9952, 7209, 4633, 1643, 1295, 2021,
  9344, 5693, 2352, 6212, 3501, 4327, 7677, 2896, 7474, 567, 9612, 6779, 5910,
  2264, 7506, 7549, 8501, 2918, 3081, 5348, 6616, 1884, 8576, 7068, 223, 3178,
  9840, 4002, 6531, 4498, 6376, 4146, 4486, 7316, 7034, 8351, 2905, 834, 3283,
  4517, 7880, 6770, 5496, 1848, 4325, 499, 1018, 4702, 8859, 913, 4355, 9650,
  3316, 1281, 3017, 9227, 4659, 3349, 4294, 3740, 9522, 9231, 1314, 3026, 1666,
  4952, 5113, 1283, 1791, 5690, 1162, 1459, 4798, 1611, 1318, 9914, 1126, 5770,
  7485, 406, 6600, 6757, 6522, 3715, 3604, 6446, 9574, 5238, 8211, 6539, 9132,
  2541, 5969, 2698, 4337, 9660, 3627, 980, 6335, 3764, 6116, 729, 3566, 8354,
  8657, 4608, 8479, 1851, 1714, 1137, 4255, 1595, 2066, 6877, 8035, 4952, 7035,
  4007, 2415, 4505, 7106, 6715, 4774, 3416, 7899, 2661, 2307, 9614, 5619, 3356,
  2611, 801, 118, 971, 5991, 977, 8059, 7015, 1474, 1011, 7673, 600, 8783, 5179,
  9868, 3, 6852, 7968, 9960, 1959, 6756, 6363, 4606, 1295, 4557, 9589, 7927,
  7739, 7583, 4951, 8060, 1277, 8748, 4258, 148, 1943, 3159, 8714, 7343, 5666,
  7220, 1611, 3859, 9753, 7764, 5622, 6338, 518, 4391, 4059, 8687, 8142, 3878,
  1426, 2370, 331, 386, 8420, 8963, 6734, 8737, 8754, 4735, 1527, 189, 5642,
  7774, 9198, 2957, 6906, 7673, 7294, 3216, 9233, 7370, 7570, 7619, 5310, 4219,
  7153, 776, 5407, 235, 2371, 238, 9465, 7651, 3378, 2849, 2012, 2949, 3917,
  4677, 9023, 4668, 7483, 1962, 6546, 5699, 1848, 7384, 1530, 9267, 3550, 9497,
  9158, 7050, 2146, 2057, 3308, 5441, 7449, 8587, 7576, 8319, 9267, 6262, 720,
  3900, 4822, 9522, 7012, 4203, 4428, 5891, 747, 3271, 8347, 3109, 2967, 4032,
  2889, 7166, 2495, 5202, 1362, 7608, 8124, 4394, 934, 4261, 1132, 9540, 7470,
  7881, 2584, 8942, 6277, 3227, 8669, 409, 4651, 4899, 5608, 453, 6742, 3356,
  641, 7207, 372, 9975, 2188, 7341, 4391, 8456, 8990, 483, 1163, 8853, 6058,
  641, 301, 6208, 9591, 9529, 7407, 8998, 5762, 1008, 1010, 7924, 8270, 9591,
  3029, 4842, 4125, 6500, 1360, 5110, 8483, 5896, 7525, 6984, 5590, 9733, 9221,
  6995, 1255, 6474, 4645, 192, 5731, 6308, 844, 5314, 6915, 7934, 9733, 40,
  8123, 9795, 6383, 2175, 7248, 6023, 5622, 6265, 8076, 883, 8898, 53, 7366,
  8856, 2879, 6125, 9745, 1684, 8436, 4412, 7808, 2618, 4151, 8565, 4182, 3719,
  5353, 4679, 5153, 4860, 7909, 3805, 4679, 419, 6808, 8179, 3842, 1077, 7756,
  1100, 4854, 4015, 8201, 4931, 3959, 6842, 1714, 3645, 8042, 8751, 7765, 6818,
  2769, 5972, 5790, 7870, 6906, 3163, 9746, 2393, 8049, 5145, 5363, 9061, 5483,
  1004, 840, 5589, 3088, 7987, 7861, 5131, 8427, 9752, 1807, 6846, 2499, 529,
  2323, 8904, 8384, 667, 5317, 2554, 9606, 2229, 6500, 1627, 9585, 5142, 5514,
  8111, 1749, 5428, 7914, 4778, 2162, 4158, 6014, 8436, 7981, 4192, 2862, 9388,
  3743, 4335, 5034, 5622, 7300, 8417, 1223, 1663, 379, 1560, 7458, 6188, 2056,
  4751, 9242, 1529, 105, 1535, 9914, 1001, 9793, 5801, 5702, 7658, 4411, 3321,
  7616, 2289, 7309, 7620, 8535, 677, 9139, 3183, 5263, 4825, 3042, 2778, 3472,
  4840, 1937, 3925, 3023, 4853, 1569, 5477, 6575, 2221, 9897, 2606, 7964, 9997,
  831, 1873, 2695, 8640, 7874, 2927, 6965, 5052, 4204, 3580, 6756, 8078, 6826,
  2260, 1867, 9128, 1842, 3554, 7168, 9445, 2664, 7470, 4933, 5092, 9256, 8934,
  5410, 6757, 7237, 5139, 6274, 3385, 178, 6781, 8344, 3217, 8975, 5647, 8825,
  4129, 9759, 2593, 2283, 9648, 2817, 8886, 645, 8285, 9530, 4497, 4688, 4268,
  7266, 6585, 2254, 1493, 4278, 1188, 4476, 6706, 4264, 3816, 892, 8876, 2481,
  4089, 4969, 3876, 6815, 7337, 6276, 8598, 5, 2480, 885, 5970, 1258, 2062,
  8261, 8941, 7465, 6150, 5075, 7362, 9929, 7819, 2751, 4306, 3006, 8966, 6440,
  6947, 1290, 3796, 8672, 614, 3177, 76, 1318, 4289, 8149, 7404, 6496, 9933,
  6447, 9583, 5679, 9501, 6726, 2966, 7461, 2514, 8224, 2031, 6457, 6785, 8451,
  9825, 6189, 387, 3219, 2272, 1942, 8603, 9239, 2212, 8312, 4031, 9546, 8585,
  5366, 8465, 2432, 4154, 330, 4919, 6098, 9708, 2952, 5322, 1123, 6376, 2701,
  8946, 7686, 5238, 2345, 3671, 8892, 4019, 3037, 6409, 9341, 3689, 5193, 3465,
  3118, 3383, 8902, 5175, 6340, 9649, 96, 6018, 5725, 8561, 2583, 7209, 1192,
  4604, 3384, 8198, 9, 3466, 8529, 3790, 1323, 525, 4713, 7740, 8788, 2245,
  5982, 5800, 4488, 4139, 9277, 1860, 1193, 4160, 298, 7358, 8935, 3479, 5895,
  7842, 8727, 6365, 9250, 2588, 6830, 1772, 6114, 8154, 4021, 8200, 3826, 2792,
  1207, 8798, 4701, 4471, 7952, 4734, 141, 250, 9646, 9270, 6578, 1561, 2524,
  3307, 3341, 8482, 191, 6097, 3483, 5844, 1773, 7584, 4144, 8199, 8808, 446,
  9439, 2943, 3368, 5506, 3812, 9963, 992, 8094, 4930, 6935, 3726, 7869, 1211,
  8698, 9294, 8789, 2437, 3178, 3122, 1546, 6441, 6554, 8882, 4323, 1805, 1765,
  804, 4475, 9890, 7932, 8618, 5546, 4547, 8758, 6845, 8999, 7018, 8939, 4398,
  5868, 8580, 5216, 156, 8361, 7005, 9386, 8358, 1976, 1193, 2394, 127, 4026,
  6370, 9102, 2309, 4161, 5529, 1317, 4567, 4975, 3809, 5471, 100, 9864, 9464,
  6109, 3935, 9462, 3209, 4715, 6439, 6923, 9571, 4043, 4750, 5188, 5599, 1182,
  5061, 4517, 1205, 8610, 3227, 1825, 540, 8776, 9341, 6182, 5601, 9287, 2850,
  9375, 1314, 2058, 605, 9524, 6555, 2021, 2762, 4945, 6478, 2506, 1136, 7903,
  1038, 8230, 3588, 151, 9945, 8114, 7905, 1320, 6613, 4677, 2485, 5340, 1078,
  2090, 8290, 5878, 7314, 7926, 8951, 224, 6723, 8744, 3469, 9218, 894, 6555,
  4808, 244, 3110, 2401, 938, 2710, 7596, 6430, 6913, 82, 3287, 1444, 2057,
  1489, 4556, 5639, 8400, 8740, 3112, 9660, 9512, 7381, 5655, 4146, 5457, 4527,
  6798, 8800, 8824, 9067, 3494, 915, 68, 4671, 5868, 7224, 371, 4667, 38, 5958,
  5616, 945, 6694, 6584, 1912, 1184, 45, 9767, 5674, 7407, 7451, 6302, 7674,
  8803, 9528, 1450, 2176, 7650, 9998, 3815, 7815, 4096, 221, 10000, 5940, 7124,
  7201, 6648, 6892, 6805, 9659, 4132, 1054, 6037, 7620, 7515, 2025, 6628, 1067,
  2431, 175, 2962, 9361, 3271, 4362, 7932, 8800, 2288, 2295, 3600, 8283, 3356,
  2265, 498, 9649, 9290, 8406, 7133, 6224, 6545, 39, 8623, 8549, 1733, 3448,
  5100, 3112, 2852, 9945, 4405, 3104, 6191, 7702, 6373, 6157, 2793, 4350, 8946,
  8329, 5076, 2603, 6162, 2347, 3005, 5911, 425, 4997, 3553, 2866, 185, 3868,
  5366, 474, 8116, 7798, 7434, 611, 4427, 5252, 725, 665, 2886, 8411, 1284, 891,
  8177, 8370, 5277, 4721, 7423, 1418, 1720, 6744, 5584, 9920, 3983, 7301, 1780,
  8295, 8275, 6256, 1900, 2504, 1159, 1897, 7975, 1587, 9276, 236, 3616, 3168,
  8011, 1844, 1481, 3385, 4087, 8862, 1710, 9866, 6134, 5890, 777, 7985, 7344,
  6726, 7942, 5503, 9094, 332, 2208, 9183, 9580, 6036, 1392, 6575, 4091, 8, 118,
  2721, 5945, 2284, 8183, 7176, 5152, 1228, 1585, 8603, 4180, 947, 1300, 8900,
  5256, 4924, 822, 2952, 5054, 8209, 8489, 6737, 2184, 6520, 4390, 5062, 1504,
  5950, 2411, 646, 655, 5050, 5611, 4476, 5392, 9097, 2650, 1307, 6433, 4805,
  2531, 8342, 9797, 9909, 1840, 2999, 8899, 3642, 8285, 9334, 9870, 264, 253,
  48, 1832, 2230, 7958, 5658, 9039, 9475, 290, 3560, 9466, 1457, 8420, 4410,
  3806, 7436, 7149, 1108, 238, 4976, 6640, 8981, 8188, 8913, 4392, 600, 9952,
  7209, 4633, 1643, 1295, 2021, 9344, 5693, 2352, 6212, 3501, 4327, 7677, 2896,
  7474, 567, 9612, 6779, 5910, 2264, 7506, 7549, 8501, 2918, 3081, 5348, 6616,
  1884, 8576, 7068, 223, 3178, 9840, 4002, 6531, 4498, 6376, 4146, 4486, 7316,
  7034, 8351, 2905, 834, 3283, 4517, 7880, 6770, 5496, 1848, 4325, 499, 1018,
  4702, 8859, 913, 4355, 9650, 3316, 1281, 3017, 9227, 4659, 3349, 4294, 3740,
  9522, 9231, 1314, 3026, 1666, 4952, 5113, 1283, 1791, 5690, 1162, 1459, 4798,
  1611, 1318, 9914, 1126, 5770, 7485, 406, 6600, 6757, 6522, 3715, 3604, 6446,
  9574, 5238, 8211, 6539, 9132, 2541, 5969, 2698, 4337, 9660, 3627, 980, 6335,
  3764, 6116, 729, 3566, 8354, 8657, 4608, 8479, 1851, 1714, 1137, 4255, 1595,
  2066, 6877, 8035, 4952, 7035, 4007, 2415, 4505, 7106, 6715, 4774, 3416, 7899,
  2661, 2307, 9614, 5619, 3356, 2611, 801, 118, 971, 5991, 977, 8059, 7015,
  1474, 1011, 7673, 600, 8783, 5179, 9868, 3, 6852, 7968, 9960, 1959, 6756,
  6363, 4606, 1295, 4557, 9589, 7927, 7739, 7583, 4951, 8060, 1277, 8748, 4258,
  148, 1943, 3159, 8714, 7343, 5666, 7220, 1611, 3859, 9753, 7764, 5622, 6338,
  518, 4391, 4059, 8687, 8142, 3878, 1426, 2370, 331, 386, 8420, 8963, 6734,
  8737, 8754, 4735, 1527, 189, 5642, 7774, 9198, 2957, 6906, 7673, 7294, 3216,
  9233, 7370, 7570, 7619, 5310, 4219, 7153, 776, 5407, 235, 2371, 238, 9465,
  7651, 3378, 2849, 2012, 2949, 3917, 4677, 9023, 4668, 7483, 1962, 6546, 5699,
  1848, 7384, 1530, 9267, 3550, 9497, 9158, 7050, 2146, 2057, 3308, 5441, 7449,
  8587, 7576, 8319, 9267, 6262, 720, 3900, 4822, 9522, 7012, 4203, 4428, 5891,
  747, 3271, 8347, 3109, 2967, 4032, 2889, 7166, 2495, 5202, 1362, 7608, 8124,
  4394, 934, 4261, 1132, 9540, 7470, 7881, 2584, 8942, 6277, 3227, 8669, 409,
  4651, 4899, 5608, 453, 6742, 3356, 641, 7207, 372, 9975, 2188, 7341, 4391,
  8456, 8990, 483, 1163, 8853, 6058, 641, 301, 6208, 9591, 9529, 7407, 8998,
  5762, 1008, 1010, 7924, 8270, 9591, 3029, 4842, 4125, 6500, 1360, 5110, 8483,
  5896, 7525, 6984, 5590, 9733, 9221, 6995, 1255, 6474, 4645, 192, 5731, 6308,
  844, 5314, 6915, 7934, 9733, 40, 8123, 9795, 6383, 2175, 7248, 6023, 5622,
  6265, 8076, 883, 8898, 53, 7366, 8856, 2879, 6125, 9745, 1684, 8436, 4412,
  7808, 2618, 4151, 8565, 4182, 3719, 5353, 4679, 5153, 4860, 7909, 3805, 4679,
  419, 6808, 8179, 3842, 1077, 7756, 1100, 4854, 4015, 8201, 4931, 3959, 6842,
  1714, 3645, 8042, 8751, 7765, 6818, 2769, 5972, 5790, 7870, 6906, 3163, 9746,
  2393, 8049, 5145, 5363, 9061, 5483, 1004, 840, 5589, 3088, 7987, 7861, 5131,
  8427, 9752, 1807, 6846, 2499, 529, 2323, 8904, 8384, 667, 5317, 2554, 9606,
  2229, 6500, 1627, 9585, 5142, 5514, 8111, 1749, 5428, 7914, 4778, 2162, 4158,
  6014, 8436, 7981, 4192, 2862, 9388, 3743, 4335, 5034, 5622, 7300, 8417, 1223,
  1663, 379, 1560, 7458, 6188, 2056, 4751, 9242, 1529, 105, 1535, 9914, 1001,
  9793, 5801, 5702, 7658, 4411, 3321, 7616, 2289, 7309, 7620, 8535, 677, 9139,
  3183, 5263, 4825, 3042, 2778, 3472, 4840, 1937, 3925, 3023, 4853, 1569, 5477,
  6575, 2221, 9897, 2606, 7964, 9997, 831, 1873, 2695, 8640, 7874, 2927, 6965,
  5052, 4204, 3580, 6756, 8078, 6826, 2260, 1867, 9128, 1842, 3554, 7168, 9445,
  2664, 7470, 4933, 5092, 9256, 8934, 5410, 6757, 7237, 5139, 6274, 3385, 178,
  6781, 8344, 3217, 8975, 5647, 8825, 4129, 9759, 2593, 2283, 9648, 2817, 8886,
  645, 8285, 9530, 4497, 4688, 4268, 7266, 6585, 2254, 1493, 4278, 1188, 4476,
  6706, 4264, 3816, 892, 8876, 2481, 4089, 4969, 3876, 6815, 7337, 6276, 8598,
  5, 2480, 885, 5970, 1258, 2062, 8261, 8941, 7465, 6150, 5075, 7362, 9929,
  7819, 2751, 4306, 3006, 8966, 6440, 6947, 1290, 3796, 8672, 614, 3177, 76,
  1318, 4289, 8149, 7404, 6496, 9933, 6447, 9583, 5679, 9501, 6726, 2966, 7461,
  2514, 8224, 2031, 6457, 6785, 8451, 9825, 6189, 387, 3219, 2272, 1942, 8603,
  9239, 2212, 8312, 4031, 9546, 8585, 5366, 8465, 2432, 4154, 330, 4919, 6098,
  9708, 2952, 5322, 1123, 6376, 2701, 8946, 7686, 5238, 2345, 3671, 8892, 4019,
  3037, 6409, 9341, 3689, 5193, 3465, 3118, 3383, 8902, 5175, 6340, 9649, 96,
  6018, 5725, 8561, 2583, 7209, 1192, 4604, 3384, 8198, 9, 3466, 8529, 3790,
  1323, 525, 4713, 7740, 8788, 2245, 5982, 5800, 4488, 4139, 9277, 1860, 1193,
  4160, 298, 7358, 8935, 3479, 5895, 7842, 8727, 6365, 9250, 2588, 6830, 1772,
  6114, 8154, 4021, 8200, 3826, 2792, 1207, 8798, 4701, 4471, 7952, 4734, 141,
  250, 9646, 9270, 6578, 1561, 2524, 3307, 3341, 8482, 191, 6097, 3483, 5844,
  1773, 7584, 4144, 8199, 8808, 446, 9439, 2943, 3368, 5506, 3812, 9963, 992,
  8094, 4930, 6935, 3726, 7869, 1211, 8698, 9294, 8789, 2437, 3178, 3122, 1546,
  6441, 6554, 8882, 4323, 1805, 1765, 804, 4475, 9890, 7932, 8618, 5546, 4547,
  8758, 6845, 8999, 7018, 8939, 4398, 5868, 8580, 5216, 156, 8361, 7005, 9386,
  8358, 1976, 1193, 2394, 127, 4026, 6370, 9102, 2309, 4161, 5529, 1317, 4567,
  4975, 3809, 5471, 100, 9864, 9464, 6109, 3935, 9462, 3209, 4715, 6439, 6923,
  9571, 4043, 4750, 5188, 5599, 1182, 5061, 4517, 1205, 8610, 3227, 1825, 540,
  8776, 9341, 6182, 5601, 9287, 2850, 9375, 1314, 2058, 605, 9524, 6555, 2021,
  2762, 4945, 6478, 2506, 1136, 7903, 1038, 8230, 3588, 151, 9945, 8114, 7905,
  1320, 6613, 4677, 2485, 5340, 1078, 2090, 8290, 5878, 7314, 7926, 8951, 224,
  6723, 8744, 3469, 9218, 894, 6555, 4808, 244, 3110, 2401, 938, 2710, 7596,
  6430, 6913, 82, 3287, 1444, 2057, 1489, 4556, 5639, 8400, 8740, 3112, 9660,
  9512, 7381, 5655, 4146, 5457, 4527, 6798, 8800, 8824, 9067, 3494, 915, 68,
  4671, 5868, 7224, 371, 4667, 38, 5958, 5616, 945, 6694, 6584, 1912, 1184, 45,
  9767, 5674, 7407, 7451, 6302, 7674, 8803, 9528, 1450, 2176, 7650, 9998, 3815,
  7815, 4096, 221, 10000, 5940, 7124, 7201, 6648, 6892, 6805, 9659, 4132, 1054,
  6037, 7620, 7515, 2025, 6628, 1067, 2431, 175, 2962, 9361, 3271, 4362, 7932,
  8800, 2288, 2295, 3600, 8283, 3356, 2265, 498, 9649, 9290, 8406, 7133, 6224,
  6545, 39, 8623, 8549, 1733, 3448, 5100, 3112, 2852, 9945, 4405, 3104, 6191,
  7702, 6373, 6157, 2793, 4350, 8946, 8329, 5076, 2603, 6162, 2347, 3005, 5911,
  425, 4997, 3553, 2866, 185, 3868, 5366, 474, 8116, 7798, 7434, 611, 4427,
  5252, 725, 665, 2886, 8411, 1284, 891, 8177, 8370, 5277, 4721, 7423, 1418,
  1720, 6744, 5584, 9920, 3983, 7301, 1780, 8295, 8275, 6256, 1900, 2504, 1159,
  1897, 7975, 1587, 9276, 236, 3616, 3168, 8011, 1844, 1481, 3385, 4087, 8862,
  1710, 9866, 6134, 5890, 777, 7985, 7344, 6726, 7942, 5503, 9094, 332, 2208,
  9183, 9580, 6036, 1392, 6575, 4091, 8, 118, 2721, 5945, 2284, 8183, 7176,
  5152, 1228, 1585, 8603, 4180, 947, 1300, 8900, 5256, 4924, 822, 2952, 5054,
  8209, 8489, 6737, 2184, 6520, 4390, 5062, 1504, 5950, 2411, 646, 655, 5050,
  5611, 4476, 5392, 9097, 2650, 1307, 6433, 4805, 2531, 8342, 9797, 9909, 1840,
  2999, 8899, 3642, 8285, 9334, 9870, 264, 253, 48, 1832, 2230, 7958, 5658,
  9039, 9475, 290, 3560, 9466, 1457, 8420, 4410, 3806, 7436, 7149, 1108, 238,
  4976, 6640, 8981, 8188, 8913, 4392, 600, 9952, 7209, 4633, 1643, 1295, 2021,
  9344, 5693, 2352, 6212, 3501, 4327, 7677, 2896, 7474, 567, 9612, 6779, 5910,
  2264, 7506, 7549, 8501, 2918, 3081, 5348, 6616, 1884, 8576, 7068, 223, 3178,
  9840, 4002, 6531, 4498, 6376, 4146, 4486, 7316, 7034, 8351, 2905, 834, 3283,
  4517, 7880, 6770, 5496, 1848, 4325, 499, 1018, 4702, 8859, 913, 4355, 9650,
  3316, 1281, 3017, 9227, 4659, 3349, 4294, 3740, 9522, 9231, 1314, 3026, 1666,
  4952, 5113, 1283, 1791, 5690, 1162, 1459, 4798, 1611, 1318, 9914, 1126, 5770,
  7485, 406, 6600, 6757, 6522, 3715, 3604, 6446, 9574, 5238, 8211, 6539, 9132,
  2541, 5969, 2698, 4337, 9660, 3627, 980, 6335, 3764, 6116, 729, 3566, 8354,
  8657, 4608, 8479, 1851, 1714, 1137, 4255, 1595, 2066, 6877, 8035, 4952, 7035,
  4007, 2415, 4505, 7106, 6715, 4774, 3416, 7899, 2661, 2307, 9614, 5619, 3356,
  2611, 801, 118, 971, 5991, 977, 8059, 7015, 1474, 1011, 7673, 600, 8783, 5179,
  9868, 3, 6852, 7968, 9960, 1959, 6756, 6363, 4606, 1295, 4557, 9589, 7927,
  7739, 7583, 4951, 8060, 1277, 8748, 4258, 148, 1943, 3159, 8714, 7343, 5666,
  7220, 1611, 3859, 9753, 7764, 5622, 6338, 518, 4391, 4059, 8687, 8142, 3878,
  1426, 2370, 331, 386, 8420, 8963, 6734, 8737, 8754, 4735, 1527, 189, 5642,
  7774, 9198, 2957, 6906, 7673, 7294, 3216, 9233, 7370, 7570, 7619, 5310, 4219,
  7153, 776, 5407, 235, 2371, 238, 9465, 7651, 3378, 2849, 2012, 2949, 3917,
  4677, 9023, 4668, 7483, 1962, 6546, 5699, 1848, 7384, 1530, 9267, 3550, 9497,
  9158, 7050, 2146, 2057, 3308, 5441, 7449, 8587, 7576, 8319, 9267, 6262, 720,
  3900, 4822, 9522, 7012, 4203, 4428, 5891, 747, 3271, 8347, 3109, 2967, 4032,
  2889, 7166, 2495, 5202, 1362, 7608, 8124, 4394, 934, 4261, 1132, 9540, 7470,
  7881, 2584, 8942, 6277, 3227, 8669, 409, 4651, 4899, 5608, 453, 6742, 3356,
  641, 7207, 372, 9975, 2188, 7341, 4391, 8456, 8990, 483, 1163, 8853, 6058,
  641, 301, 6208, 9591, 9529, 7407, 8998, 5762, 1008, 1010, 7924, 8270, 9591,
  3029, 4842, 4125, 6500, 1360, 5110, 8483, 5896, 7525, 6984, 5590, 9733, 9221,
  6995, 1255, 6474, 4645, 192, 5731, 6308, 844, 5314, 6915, 7934, 9733, 40,
  8123, 9795, 6383, 2175, 7248, 6023, 5622, 6265, 8076, 883, 8898, 53, 7366,
  8856, 2879, 6125, 9745, 1684, 8436, 4412, 7808, 2618, 4151, 8565, 4182, 3719,
  5353, 4679, 5153, 4860, 7909, 3805, 4679, 419, 6808, 8179, 3842, 1077, 7756,
  1100, 4854, 4015, 8201, 4931, 3959, 6842, 1714, 3645, 8042, 8751, 7765, 6818,
  2769, 5972, 5790, 7870, 6906, 3163, 9746, 2393, 8049, 5145, 5363, 9061, 5483,
  1004, 840, 5589, 3088, 7987, 7861, 5131, 8427, 9752, 1807, 6846, 2499, 529,
  2323, 8904, 8384, 667, 5317, 2554, 9606, 2229, 6500, 1627, 9585, 5142, 5514,
  8111, 1749, 5428, 7914, 4778, 2162, 4158, 6014, 8436, 7981, 4192, 2862, 9388,
  3743, 4335, 5034, 5622, 7300, 8417, 1223, 1663, 379, 1560, 7458, 6188, 2056,
  4751, 9242, 1529, 105, 1535, 9914, 1001, 9793, 5801, 5702, 7658, 4411, 3321,
  7616, 2289, 7309, 7620, 8535, 677, 9139, 3183, 5263, 4825, 3042, 2778, 3472,
  4840, 1937, 3925, 3023, 4853, 1569, 5477, 6575, 2221, 9897, 2606, 7964, 9997,
  831, 1873, 2695, 8640, 7874, 2927, 6965, 5052, 4204, 3580, 6756, 8078, 6826,
  2260, 1867, 9128, 1842, 3554, 7168, 9445, 2664, 7470, 4933, 5092, 9256, 8934,
  5410, 6757, 7237, 5139, 6274, 3385, 178, 6781, 8344, 3217, 8975, 5647, 8825,
  4129, 9759, 2593, 2283, 9648, 2817, 8886, 645, 8285, 9530, 4497, 4688, 4268,
  7266, 6585, 2254, 1493, 4278, 1188, 4476, 6706, 4264, 3816, 892, 8876, 2481,
  4089, 4969, 3876, 6815, 7337, 6276, 8598, 5, 2480, 885, 5970, 1258, 2062,
  8261, 8941, 7465, 6150, 5075, 7362, 9929, 7819, 2751, 4306, 3006, 8966, 6440,
  6947, 1290, 3796, 8672, 614, 3177, 76, 1318, 4289, 8149, 7404, 6496, 9933,
  6447, 9583, 5679, 9501, 6726, 2966, 7461, 2514, 8224, 2031, 6457, 6785, 8451,
  9825, 6189, 387, 3219, 2272, 1942, 8603, 9239, 2212, 8312, 4031, 9546, 8585,
  5366, 8465, 2432, 4154, 330, 4919, 6098, 9708, 2952, 5322, 1123, 6376, 2701,
  8946, 7686, 5238, 2345, 3671, 8892, 4019, 3037, 6409, 9341, 3689, 5193, 3465,
  3118, 3383, 8902, 5175, 6340, 9649, 96, 6018, 5725, 8561, 2583, 7209, 1192,
  4604, 3384, 8198, 9, 3466, 8529, 3790, 1323, 525, 4713, 7740, 8788, 2245,
  5982, 5800, 4488, 4139, 9277, 1860, 1193, 4160, 298, 7358, 8935, 3479, 5895,
  7842, 8727, 6365, 9250, 2588, 6830, 1772, 6114, 8154, 4021, 8200, 3826, 2792,
  1207, 8798, 4701, 4471, 7952, 4734, 141, 250, 9646, 9270, 6578, 1561, 2524,
  3307, 3341, 8482, 191, 6097, 3483, 5844, 1773, 7584, 4144, 8199, 8808, 446,
  9439, 2943, 3368, 5506, 3812, 9963, 992, 8094, 4930, 6935, 3726, 7869, 1211,
  8698, 9294, 8789, 2437, 3178, 3122, 1546, 6441, 6554, 8882, 4323, 1805, 1765,
  804, 4475, 9890, 7932, 8618, 5546, 4547, 8758, 6845, 8999, 7018, 8939, 4398,
  5868, 8580, 5216, 156, 8361, 7005, 9386, 8358, 1976, 1193, 2394, 127, 4026,
  6370, 9102, 2309, 4161, 5529, 1317, 4567, 4975, 3809, 5471, 100, 9864, 9464,
  6109, 3935, 9462, 3209, 4715, 6439, 6923, 9571, 4043, 4750, 5188, 5599, 1182,
  5061, 4517, 1205, 8610, 3227, 1825, 540, 8776, 9341, 6182, 5601, 9287, 2850,
  9375, 1314, 2058, 605, 9524, 6555, 2021, 2762, 4945, 6478, 2506, 1136, 7903,
  1038, 8230, 3588, 151, 9945, 8114, 7905, 1320, 6613, 4677, 2485, 5340, 1078,
  2090, 8290, 5878, 7314, 7926, 8951, 224, 6723, 8744, 3469, 9218, 894, 6555,
  4808, 244, 3110, 2401, 938, 2710, 7596, 6430, 6913, 82, 3287, 1444, 2057,
  1489, 4556, 5639, 8400, 8740, 3112, 9660, 9512, 7381, 5655, 4146,
];

let arr1 = [5, 2, 12, 1, 5, 3, 4, 11, 9, 4];

console.time();
console.log(maxArea(arr1));
console.timeEnd();
